package com.qidian.k12.dto;

import java.util.List;

/**
 * @author 戴着假发的程序
 */
public class PageInfo<T> {
    private int page=1;
    private int row=10;
    private int total=0;
    private int maxPageNun=1;
    private int pageStart=1;
    private int pageEnd=10;
    private List<T> data;
    private int start=1;

    private void cstart(){
        start = (page-1) * row;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
        // 计算start
        cstart();
    }

    public int getRow() {
        return row;
    }

    public void setRow(int row) {
        this.row = row;
        // 计算start
        cstart();
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getMaxPageNun() {
        return maxPageNun;
    }

    public void setMaxPageNun(int maxPageNun) {
        this.maxPageNun = maxPageNun;
    }

    public int getPageStart() {
        return pageStart;
    }

    public void setPageStart(int pageStart) {
        this.pageStart = pageStart;
    }

    public int getPageEnd() {
        return pageEnd;
    }

    public void setPageEnd(int pageEnd) {
        this.pageEnd = pageEnd;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }
}
